<script setup>
import {reactive} from "vue";
import VDialog from './VDialog.vue'

const dialog = reactive({
  visible: false
});
const openDialog = () => {
  dialog.visible = true;
};
</script>

<template>
  <div>
    <h1>demo07 《Vue3》第07节：Vue3基于ElementPlus自定义dialog组件
    </h1>
    <el-button @click="openDialog" type="primary">打开Dialog</el-button>
    <v-dialog v-model="dialog.visible" title="标题" width="50%" @close="dialog.visible = false">
      <div>内容</div>
    </v-dialog>
  </div>
</template>

<style scoped>
</style>